package display
{
	import flash.display.DisplayObject;
	
	public class Align
	{
		public function Align()
		{
		}
		public static function getPosY( obj: DisplayObject, space: int = 5 ): int
		{
			var rtn: int = obj.y + obj.height + space;
			
			return rtn;
		}
		public static function getPosX( obj: DisplayObject, space: int = 5 ): int
		{
			var rtn: int = obj.x + obj.width + space;
			
			return rtn;
		}
		public static function getCenterX( obj: DisplayObject, own: DisplayObject ): int
		{
			var rtn: int = int( obj.x + (obj.width - ( obj.width + own.width ) / 2 )); 
			return rtn;
		}
		public static function getCenterY( obj: DisplayObject, own: DisplayObject ): int
		{
			var rtn: int = int( obj.y + ( obj.height - ( obj.height + own.height ) / 2) ); 
			return rtn;
		}
	}
}